package com.AFH.test;

import java.util.ArrayList;
import java.util.Random;

import android.graphics.Rect;

public class GameData{
	
	//TEST DATA HERE
	//set selected elemetents
	public static int SingleFire    = 1;
	public static int SingleWater   = 2;
	public static int SingleWood    = 3;
	public static int SingleEarth   = 4;
	public static int SingleMetal   = 5;
	public static int EscType = 99;
	
	//surprise content 
	public static String GetBomb    ="YOU'VE GOT A BOMB!";
	public static String GetMoney   ="YOU'VE GOT";
	public static String lostMoney  ="SORRY!YOU'VE LOST";
	public static String GetScore   ="YOU'VE GOT";
	//stage setting
	public static int stage =1;
	
	//Initialize monsterA's animation array 
	//fire tower

	//Initialize monsterA
	public static int BirthX=800;
	public static int BirthY;
	
	//Initialize monsterA's refreshing frequency
	public static int monsterAtime[]={500,3000,7500,10000,9000};
	
	//control monsterA
	public static void monstera1BirthRow(int i){
		 BirthY = 80*i;
	}
	
	
	
	//common variables
	public static int TOWER_NUM = 32;
	public static int MapRows = 4;
	public static int MapCols = 8;
	
	
	//tower status
	public static int NOT_BUILT   = 0;
	public static int HAVE_BUILT  = 1;
	public static int IS_BUILDING = 2;
	
	
	
	public static ArrayList<Rect> RectMap= new ArrayList<Rect>();
	
	
	
	
	
	//surprise box position
	
	
	//constuctor of building position
	public static ArrayList<Rect> creatArrayRect(){
		int num=0;
		for(int i=0;i<MapRows;i++)
		{
			for(int j=0;j<MapCols;j++)
			{
				
				Rect rect = new  Rect(0+j*80,80+i*80 ,80+j*80,160+i*80);
				RectMap.add(num, rect);
				num++;
				//RectMap.add(rect);
					
			}
		}
		
		return RectMap;
	}
	public static  int [][] TowerBuilt ={
		{0,0,0,0,0,0,0,0},
		{0,0,0,0,0,0,0,0},
		{0,0,0,0,0,0,0,0},
		{0,0,0,0,0,0,0,0}
	};
	

	public GameData(){
		
		
	}
	static Random rnd=new Random();
	/**************************************************************************************
	 *  FORMAL GAME DATA
	 **************************************************************************************/
	// TOWERS:
	public static final int FIRETOWER          = 1;
	public static final int DEFTOWER           = 2;
	public static final int NATURETOWER        = 3;
	public static final int THUNDERTOWER       = 4;
	// LINES
	public static final int LINE1         = 80;
	public static final int LINE2         = 160;
	public static final int LINE3         = 240;
	public static final int LINE4         = 320;
	
	
	// MONSTERS:
	public static final int MONSTER_black     = 4;
	public static final int MONSTER_white      = 5;
	public static final int MONSTER_boss     = 6;
	;
	// BOSS:
	public static final int BOSSA         = 1;
	public static final int BOSSB         = 2;
	public static final int BOSSC         = 3;
	// ANIMATION
	public static int monsterBlack[][]={
		{0,1,2,3},
		{0,1,2,3},
		{0,1,2,3},
		{11,12,13,14},
		{99}
	};
	public static int monsterWhite[][]={
		{21,22,23},
		{21,22,23},
		{21,22,23},
		{21},
		{99}
	};
	public static int Boss[][] = {
		{31,32,33,34},
		{31,32,33,34},
		{31,32,33,34},
		{31},
		{99}
	};
	public static int TowerFire[][]={
		{0},
		{0,1,2},
		{0},
		{0},
		{0}
	};
	public static int TowerDef[][]={
		{3},
		{3,3,3},
		{3},
		{3},
		{3}
	};
	public static int TowerNature[][]={
		{11},
		{12,13,14},
		{11},
		{11},
		{11}
	};
	public static int TowerThunder[][]={
		{21},
		{22,23,24},
		{21},
		{21},
		{21}
	};
	public static final int TOWERFIREATTACK [][]  = {
		{0,1,2,99}
	};
	public static final int MONSTERAATTACK  [][]  = {
		{3,4,5,6,7,8,9,10,99}
	};
	public static final int TOWERTHUNDERATTACK [][]= {
		{11,12,13,99}
	};
	public static final int TOWERNATUREATTACK [][] = {
		{21,22,23,99}
	};
	public static final int BOOM [][] ={
		{13},
		{13},
		{13},
		{10,11,12,13}
	};
	//Building menu Rect
	public static Rect BuildMenu = new Rect(20,400,150,480);
	public static Rect Tower1 =  new Rect(0,0,80,80);
	public static Rect Tower2 =  new Rect(90,0,170,80);
	public static Rect Tower3 =  new Rect(180,0,260,80);
	public static Rect Tower4 =  new Rect(270,0,350,80);
	public static Rect EndBuild = new Rect(710,0,790,80);
	public static Rect Bomb   = new Rect(450,400,530,480);
	
	public static Rect TryAgagin = new Rect(251,307,275,342);
	public static Rect Quit 	 = new Rect(428,307,548,342);

	
	public static Rect Title	 = new Rect(284,263,371,294);
	public static Rect Continue	 = new Rect(431,263,518,294);
	//Profile
	public static UserProfile gameProfile=new UserProfile(0);



	

	

	
	
}